package com.fyt.reachgo.domain.VO;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import jakarta.persistence.Column;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserFavoriteVO {
    private String targetType;

    private Integer id;

    /**
     * 路书标题
     */
    @Column(nullable = false, length = 100)
    private String title;

    private String departureLocation;

    private String destination;
    /**
     * 创建用户ID（NULL表示系统推荐）
     */
    @Column(name = "author_id")
    private Long authorId;

    /**
     * 建议行程天数
     */
    @Column(nullable = false)
    private Integer days;

    /**
     * JSON格式路书内容（包含每日详细安排）
     */
    @Column(name = "content", columnDefinition = "JSON")
    @TableField(typeHandler = JacksonTypeHandler.class) // 使用 JacksonTypeHandler 处理 JSON
    private Object content;

    /**
     * 点赞数量统计
     */
    private Integer likes;

    /**
     * 创建时间
     */
    private Date createTime;

    private String coverImageUrl;
}
